package Demo2;

/**
 * ClassName Derived
 * Description TODO
 * Author Yanyan
 * Date 2025/11/10 22:12
 * Version 1.0
 */
public class Derived extends Base{
    public int a = 2;
    public int b;
    public int c;

    public void test() {
        a = 4;
        b = 2;
        c = 3;
        System.out.println(this.a);
        System.out.println("父类的:" + super.a);
        System.out.println(b);
        System.out.println(c);

        super.method();
    }

    public void method() {
        System.out.println("Derived::method");
    }

    public void methodB(int a){
        System.out.println("Derived::methodB()" + a);
    }

    public static void methodB(){
        System.out.println("Derived::methodB()");
    }
}
